<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class m_form_dinamis extends CI_Model {

	public function __construct(){
		parent::__construct();
	}	

	function get_all() {
		$sql = 'SELECT * FROM obat';
		$query = $this->db->query($sql);
		if ($query->num_rows() > 0) {
			$result = $query->result_array();
			$query->free_result();
		} else {
			$result = array();
		}
		return $result;
	}

	function update_max_dosis($KdObat, $dataUpdate) {
		$this->db->where('KdObat', $KdObat);
		$this->db->update('obat', $dataUpdate);
		if($this->db->affected_rows() > 0){
			return true;
		}else{
			return false;
		}
	}
}

/* End of file m_obat_data.php */
/* Location: ./application/models/m_obat_data.php */